#include "CRGB.h"

CCRGB::CCRGB(double red, double green, double blue):red(red),green(green),blue(blue)
{

}

CCRGB CCRGB::operator*(double t)
{
    
    this->blue*= t;
    this->green*= t;
    this->red*= t;
    return *this;
}

CCRGB CCRGB::operator+(CCRGB c)
{
    this->blue += c.blue;
    this->green += c.green;
    this->red += c.red;
    return *this;
}

CCRGB CCRGB::LinearInterp(double t, double tStart, double tEnd, CCRGB cStart, CCRGB cEnd)
{
    CCRGB color;
    color = cStart * ((t - tEnd) / (tStart - tEnd)) + cEnd * ((t - tStart) / (tEnd - tStart));
    return color;
}
